package com.springboot.orderechart.controller;


import com.springboot.orderechart.service.ISourceService;
import com.springboot.orderechart.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-06-11
 */
@Controller
@RequestMapping("/api/source")
public class SourceController {

    @Autowired
    private ISourceService iSourceService;

    /**
     * 新增模拟生成1000条mysql数据
     * @return
     */
    @RequestMapping("/reload")
    @ResponseBody
    public Result reload() {
        return this.iSourceService.reload();
    }



    /**
     * 统计展示
     * @return
     */
    @RequestMapping("/getEchart")
    @ResponseBody
    public Result getEchart(){
        return this.iSourceService.getEchart();
    }




}
